The present invention relates to a vector processor, and more particularly to a vector processor suitable for symbol processing such as character string data processing.
With recent development of a super computer, effectiveness of vector processing has been widely known. In an application field of the vector processing, not only numeric calculation application but also other applications such as symbol processing have been discussed. However, many difficulties arise when a vector processor is to be applied to the symbol processing. A particular problem is processing of variable length data (character string and list) which are frequently seen in the symbol processing. In the following, search processing of the character string is discussed to explain problems involved therein.
In the character string retrieval for example, all words having coincidence with a key word "abc" are retrieved from a string of a plurality of words ["abe", "ft", "abc", "lpik", "abc"].
When the character string search is to be carried out by a prior art vector processor as shown in Japanese patent Application Unexamined Publn. No. 53-87640, a system shown in FIG. 1 may be considered. A vector 1004 having an element length which is long enough to store a longest word (i.e. "lpick" in the word string is prepared and the words are stored in respective elements, and the elements in the vector 1004 are sequentially compared with a key word 1003 by a vector command to produce a compare result vector 1005.
However, the system shown in FIG. 1 has the following two problems. When the lengths of words greatly differ, a memory area for storing the word string is wasted. In the prior art vector processor, an appear limit of the length of the vector elements which can be processed is fixed (usually 8 bytes), and a word string which includes a word longer than the upper limit is not processed.